import request from '@/utils/request'

// 查询会员类型列表
export function getMemberType(query) {
    return request({
      url: '/member/getMemberType',
      method: 'get',
      params: query
    })
  }

// 通过id查询单个数据
export function getById(id,venueUniqueIdentifier) {
  const data = {
    id,
    venueUniqueIdentifier
  }
    return request({
        url: '/member/getById',
        method: 'put',
        data: data
    })
}

// 新增会员类型
export function addMember(data) {
    return request({
      url: '/member/addMember',
      method: 'post',
      data: data
    })
  }

  // 删除会员类型
export function delMember(id,venueUniqueIdentifier) {
  const data = {
    id,
    venueUniqueIdentifier
  }
    return request({
      url: '/member/delMember',
      method: 'put',
        data: data
    })
  }

  // 修改会员类型
export function updateMemberById(data) {
    return request({
      url: '/member/updateMemberById',
      method: 'post',
      data: data
    })
  }

  // 会员状态修改
export function updateEnableStatus(id, enableStatus, venueUniqueIdentifier) {
    const data = {
      id,
      enableStatus,
      venueUniqueIdentifier
    }
    return request({
      url: '/member/updateEnableStatus',
      method: 'put',
      data: data
    })
  }